rpa::obuf_storage< Type[N], IterBuf >::internal_buffer Class Reference

This shares the same container properties as the physical buffer it points to. More...

#include <common.h>

List of all members.

Public Types

typedef obuf_storage::buffer_type physical_buf_t
 This is the type of the physical buffer.
typedef container_traits<
physical_buf_t > 
cont_trts
typedef cont_trts::const_iterator const_iterator
typedef cont_trts::iterator iterator
typedef cont_trts::value_type value_type

Public Member Functions

 internal_buffer ()
 internal_buffer (const internal_buffer &aBuf)
 internal_buffer (physical_buf_t &aBuf)
 Very fast : We take the address of the beginning of an array.
physical_buf_t & phys_buf (void)
 This class can behave as a physical_buf_t due to this converter.
const physical_buf_t & phys_buf (void) const
const physical_buf_t & phys_buf_const (void) const
iterator begin (void)
 If the buffer has a limited size (Mutex).
iterator end (void)
const_iterator begin (void) const
 For read-only access.
const_iterator end (void) const
void resize (size_t aSz)
void clear (void)

Private Member Functions

void check (void) const
 Run-time consistency checking for debug release only.
internal_buffer & operator= (const internal_buffer &aIB)
 Assignments are forbidden.

Private Attributes

physical_buf_t * _buf


Detailed Description

template<class Type, size_t N, class IterBuf>
class rpa::obuf_storage< Type[N], IterBuf >::internal_buffer

This shares the same container properties as the physical buffer it points to.


Member Typedef Documentation

template<class Type, size_t N, class IterBuf>
typedef cont_trts::const_iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::const_iterator

template<class Type, size_t N, class IterBuf>
typedef container_traits<physical_buf_t> rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::cont_trts

template<class Type, size_t N, class IterBuf>
typedef cont_trts::iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::iterator

template<class Type, size_t N, class IterBuf>
typedef obuf_storage::buffer_type rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::physical_buf_t

This is the type of the physical buffer.

template<class Type, size_t N, class IterBuf>
typedef cont_trts::value_type rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::value_type


Constructor & Destructor Documentation

template<class Type, size_t N, class IterBuf>
rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::internal_buffer (  )  [inline]

This default constructor ensures, for security, that the buffer is invalid, to help errors detection.

template<class Type, size_t N, class IterBuf>
rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::internal_buffer ( const internal_buffer &  aBuf  )  [inline]

Simply copy the buffer's pointer (Not the object itself), because the buffer is allocated or created 'outside' this class.

template<class Type, size_t N, class IterBuf>
rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::internal_buffer ( physical_buf_t &  aBuf  )  [inline]

Very fast : We take the address of the beginning of an array.


Member Function Documentation

template<class Type, size_t N, class IterBuf>
const_iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::begin ( void   )  const [inline]

For read-only access.

template<class Type, size_t N, class IterBuf>
iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::begin ( void   )  [inline]

If the buffer has a limited size (Mutex).

template<class Type, size_t N, class IterBuf>
void rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::check ( void   )  const [inline, private]

Run-time consistency checking for debug release only.

template<class Type, size_t N, class IterBuf>
void rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::clear ( void   )  [inline]

The buffer is cleared before each algorithm execution. This is necessary, because obuf_iterators with infinite-size output buffers, write their output into a back_inserter. So, without a 'clear', we would keep the data of the last previous run.

template<class Type, size_t N, class IterBuf>
const_iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::end ( void   )  const [inline]

template<class Type, size_t N, class IterBuf>
iterator rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::end ( void   )  [inline]

template<class Type, size_t N, class IterBuf>
internal_buffer& rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::operator= ( const internal_buffer &  aIB  )  [private]

Assignments are forbidden.

template<class Type, size_t N, class IterBuf>
const physical_buf_t& rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::phys_buf ( void   )  const [inline]

The compiler can choose the const or non-const version. This is specially done for flush_all and flush_itr.

template<class Type, size_t N, class IterBuf>
physical_buf_t& rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::phys_buf ( void   )  [inline]

This class can behave as a physical_buf_t due to this converter.

template<class Type, size_t N, class IterBuf>
const physical_buf_t& rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::phys_buf_const ( void   )  const [inline]

This class can behave as a physical_buf_t due to this converter. The constness is enforced.

template<class Type, size_t N, class IterBuf>
void rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::resize ( size_t  aSz  )  [inline]

There is no need of a push_back method because the algorithm simply manipulates a plain pointer, even with a fixed limit.


Member Data Documentation

template<class Type, size_t N, class IterBuf>
physical_buf_t* rpa::obuf_storage< Type[N], IterBuf >::internal_buffer::_buf [private]

As 'IterBuf' is not void, we use a pointer to the buffer given by IterBuf. NOTE: This is a plain pointer to a C-style array, allocated elsewhere.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:35 2007 for rpa by  doxygen 1.4.7